package kr.hkit.PowerJava.chapter07;

public class Car {
     private String color;
     private int speed;
     private int gear;
     
     public Car(){}

     
     
	public Car(String color) {
		
		this(color, 0, 1);
		}
public Car(String color, int speed){
	   this(color, speed, 1);
	   
}


	@Override
	public String toString() {
		return "Car [color=" + color + ", speed=" + speed + ", gear=" + gear
				+ "]";
	}

	
    public Car(String color, int speed, int gear) {
	//	super();
		this.color = color;
		this.speed = speed;
		this.gear = gear;
	}

	public void setColor(String color){ 
           this.color = color;
    }
    public String getColor(){
    	return color;
    }

	public int getSpeed() {
		return speed;
	}

	public void setSpeed(int speed) {
		this.speed = speed;
	}

	public int getGear() {
		return gear;
	}

	public void setGear(int gear) {
		this.gear = gear;
	}

}

